/**
 * Created by zsyoung on 2017/9/1.
 */




function barShow(dataArr) {
    $('#bar_container').highcharts({
        chart: {
            type: 'column',
            zoomType: 'x'
        },
        title: {
            text: '统计结果柱状图展示'
        },
        xAxis: {
            type: 'category',
            title: {
                text: '单词'
            },
            labels: {
                rotation: -45,
                style: {
                    fontSize: '13px',
                    fontFamily: 'Verdana, sans-serif'
                }
            }
        },
        yAxis: {
            min: 0,
            title: {
                text: '次数 (次)'
            }
        },
        legend: {
            enabled: true
        },
        tooltip: {
            pointFormat: '单词出现: <b>{point.y} 次</b>'
        },
        series: [
            {
                name: '总次数',
                data: dataArr,
                dataLabels: {
                    enabled: true,
                    // rotation: -90,
                    color: '#FFFFFF',
                    align: 'right',
                    //format: '{point.y:.1f}', // one decimal
                    y: 10, // 10 pixels down from the top
                    style: {
                        fontSize: '13px',
                        fontFamily: 'Verdana, sans-serif'
                    }
                }
            }
        ]
    });

}

